home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ansi / use2crts.zip / FLIP.ASM < prev    next >
Assembly Source File  |  1986-10-30  |  1KB  |  45 lines

  1. ;RECOVERED FROM THE BAD USE2CRTS.LBR
  2. ;FLIP.ASM  From the Feb. 19, 1985 issue of PC Magizine, pp256
  3. ;This program switches the color monitor active page between 0 & 1.
  4. ;convert to flip.com with exe2bin
  5.  
  6.  
  7. code_seg    segment
  8.         assume cs:code_seg
  9.         org 100h
  10. begin:        mov ah,15    ;read vidio state (call to BIOS)
  11.         int 10h        ;
  12.         and bh,1    ;make sure we deal only with 0 or 1
  13.         xor bh,1    ;switch to other page
  14.         mov bl,bh    ;save new page
  15.         mov al,bh    ;set new active page (call to BIOS)
  16.         mov ah,5    ;
  17.         int 10h        ;
  18.         mov dh,22    ;set cursor to row 22
  19.         mov dl,0    ;    and column 0
  20.         mov ah,2    ;set cursor position (call to BIOS)
  21.         int 10h        ;
  22.         mov ch,6    ;assume page 0, begin cursor at 6
  23.         mov cl,7    ;end cursor at line 7
  24.         or bh,bh    ;check new page number
  25.         jz is_zero    ;if new page is 0, we guessed right
  26.         mov ch,0    ;cursor begins at line 0
  27. is_zero:    mov ah,1    ;set cursor type (call to BIOS)
  28.         int 10h        ;
  29.         mov ch,23    ;set upper left of window to row 23
  30.         mov cl,0    ;    and column 0
  31.         mov dh,24    ;set lower right of window to row 24
  32.         mov dl,79    ;    and column 79
  33.         mov al,0    ; blank the window
  34.         mov bh,7    ;use white on black
  35.         mov ah,6    ; perform window scroll (call to BIOS)
  36.         int 10h        ;
  37.         mov al,bl    ;supply new page number as return code
  38.         mov ah,4ch    ;exit to DOS
  39.         int 21h        ;
  40. code_seg    ends
  41.         end begin
  42.  
  43.  
  44. ;courtesy of The Consultants' Exchange, (714) 842-6348 data
  45.